Programming without a text editor

Published

I was just thinking about the tools one can use to write programs. Sure text editors are not especially great compared to professional IDEs like Visual Studio. But somehow I had to think about punch cards and that it probably required much more discipline to program with these. One hole punched at the wrong place… to bad, start over with a new card.

Though thought patters only known to unconscious regions of my brain I remembered a nice xkcd comic: Real Programmers. In there someone says "Real programmers use cat". Hm, that is as low level as I could imagine to go with software. But what if even cat isn't there to help you? What if you attack a server and for some unknown reason get a root shell with a full gcc environment but without cat?

gcc -x c -

This will instruct gcc to read a C programm (-x c) from standard input (the last -). Now you can write down your program line by line. Made an error in the line above? To bad, start over with a new program. :)

Well, it's not as cool as using a magnetized needle but I'm sure it's a nice toy for real programmers. Now, I think I just invented another discipline real programmers can compete in: line buffered programming. Thank good I'm not one of them…

ps.: The really real programmers can write line buffered Java.

pps.: I'm currently writing my bachelor thesis. So, please don't be surprised if some craziness lacks out of my skull here and there…

NNTP-Forum now on GitHub

Published

When the NNTP-Forum was first published two of my friends wanted to see it on GitHub. Well, it's there now: arkanis/nntp-forum.

The French developer Mr Xhark helped me to continue development on the project. Thanks to his relentless testing the NNTP-Forum is now internationalized. It supports three languages: English, German and French (by Mr Xhark). It's also quite easy to write your own language file.

Funny how the experience from the long gone Simple Localization Rails plugin help with this PHP project: The i18n code is about 30 lines of code. It always amazes me how little code is necessary if you know what you need. Ironcially the function that searches the HTTP headers for the users prefered language is about the same size. :D

Anyway, maybe you accidentally have an NNTP server running. In that case you can give the NNTP-Forum a try. Be sure to check out the setup and configuration guide.

Printing the LLVM Language Reference Manual

Published

LLVM is a very handy piece of software with a quite long manual for its intermediate language. Since I don't like reading long documents on screen I invested 3 hours to generate and print a nice PDF version of the manual. It's not perfect but still comfortable to read.

Thanks to PrinceXML all that is necessary is a small CSS style sheet with printing styles. I also used the Gentium fonts because they are easy to read on paper. Anyone interested in generating an up to date PDF can download the style sheet archive. It contains the style sheet and the Gentium fonts. Extract it into a directory and with PrinceXML installed this command will generate the PDF:

prince --no-author-style --style llvm-lang-ref.css -o llvm-lang-ref.pdf \
    http://www.llvm.org/docs/LangRef.html

Have fun reading. :)

The plains project

Published

Who doesn't know this situation: You made a note and some time later you need it again. And then it happens: "Where did I put that?!". And the search begins…

Having some stacks of notes flying around my desk I'm very prone to that problem. I've tried some software solutions to this over the last few years: offline wikis, address books (Thunderbird, Opera, etc.), some desktop notes (Tomboy, Opera), files sorted into different directory structurs, tagging, deskop search engines, etc. Nothing really helped me much. It's often quite easy to store data but finding it… well, it didn't work quite well for me.

Please, don't get me wrong. It's not that I can not find something I put into a directory 10 minutes ago. It's just the sheer amount of data that makes it difficult to organize. Many project, many ideas, notes and bookmarks. A small library of sorts, but well, everyone has that today I suppose.

Anyway, I finally took the time to write a little tool to help me organize my stuff:

The plain project

The core idea is the map metaphor. Put everything on a 2D space so it forms some recognizable patterns. Then your spatial sense of direction will help you to get around.

This works very well with classical maps. You know, these things on paper we all used before google maps and navigation systems were around. Once you've found a place on a map it's very easy to find it again. The same principal has been partially used in graphical user interfaces since 1968 (or maybe even earlier, don't know), albeit for other purposes. Well, usability principals is something for another post. Lets just say I've tested out one extreme end of the design space: put everything on a map.

The plain project is a small web application that allows you to put notes and ideas on a 2D space. You can group related stuff into new areas I somehow started to call "plains". Don't ask me why, the name just stuck. Basically it's just a different representation of files (notes and ideas) and directories (plains). However the content is shown directly and the user can move it around on the plains. Even if it sounds stupid, that is the important part: after a little while you build your own map. And since you know every spot it's pretty easy to find something. In an afterthought this reminds me of some memorization methods.

You can give it a try on the sample installation. The code is hosted on GitHub, but be aware: It's a tool for personal usage and therefore not very clean.

How well this map metaphor will scale with large amounts of information I don't know. Right now I've only moved the stuff of the last year or so into my personal plains. Over the next few weeks I'll move over my contacts and complete bookmarks. Especially the bookmarks contain some tricky to sort stuff but only time will tell how well that works. Maybe I can use symlinks in some cases to sort something into multiple categories.

Everything is stored in text files and directories right now. This is primary to keep the data "free" of any application. If the plain project should not work out I don't want to have a big SQLite file laying around. There's also the benefit that I can use the file manager to organize stuff in case the web application doesn't work well (e.g. for large documents nothing beats your text editor of choice).

And this is one of the major problems right now: I used CSS transformation for the panning and zooming. This causes bugs in pretty much any browser I uses. Opera has redraw issues, Firefox jumps around when you click the edit button and Chromium does not allow to scroll in textareas that are off the center. The performance is abysmal in every browser. Right now I use Chromium most of the time.

Further ideas

While I have something I can work with now the map metaphor has massive potential. Not only for small text snippets but for files, pictures, etc. I want to explore that form of usability a bit more but browsers might become to much of a bottleneck. I don't want to store everything on my server either.

Therefore the next iteration will probably be done as a native Linux application based on X11 and OpenGL. This should allow much better controls and other very interesting stuff like organizing hundreds of pictures and files. Maybe its even possible to add normal applications as entries to plains. Well, only time will tell.